import request from './request';

export default {
	login: (data) =>
		request({
			url: '/api/settings/getUser',
			method: 'POST',
			data
		}),
	createSign: (data) =>
		request({
			url: '/api/settings/createSign',
			method: 'POST',
			data
		}),
	memberList: (params) =>
		request({
			url: '/api/settings/pullingUserList',
			method: 'GET',
			params
		}),
	myFriendList: (params) =>
		request({
			url: '/api/settings/addGroupUserList',
			method: 'GET',
			params
		}),
	addMember: (data) =>
		request({
			url: '/api/settings/pullingUser',
			method: 'POST',
			data
		}),
	deleteMember: (data) =>
		request({
			url: '/api/settings/deleteGroupUser',
			method: 'POST',
			data
		}),
	createGroup: (data) =>
		request({
			url: '/api/settings/handCreateGroup',
			method: 'POST',
			data
		}),
	quitGroup: (data) =>
		request({
			url: '/api/settings/exitGroup',
			method: 'POST',
			data
		}),
	setTop: (data) =>
		request({
			url: '/api/settings/conversationsTop',
			method: 'POST',
			data
		}),
	getTop: (data) =>
		request({
			url: '/api/settings/msgTopStatus',
			method: 'POST',
			data
		}),
	editGroupName: (data) =>
		request({
			url: '/api/settings/updateGroupName',
			method: 'POST',
			data
		}),
	// 获取服务消息列表
	getServiceMsgList: (params) =>
		request({
			url: '/api/settings/conversationsPlatformList',
			method: 'GET',
			params
		}),
	// 获取普通对话消息列表
	getMessageList: (params) =>
		request({
			url: '/api/settings/conversationsList',
			method: 'GET',
			params
		}),
	// 删除会话
	deleteConversation: (data) =>
		request({
			url: '/api/settings/deleteConversations',
			method: 'POST',
			data
		}),
	// 获取会话详情
	getMessageDetails: (params) =>
		request({
			url: '/api/settings/talkDetail',
			method: 'GET',
			params
		}),
	// 我的群聊分类
	groupType: () =>
		request({
			url: '/api/settings/groupType',
			method: 'GET',
		}),
	// 我的群聊
	myGroupList: (params) =>
		request({
			url: '/api/settings/myGroup',
			method: 'GET',
			params
		}),
	// 首页分类
	typeList: (params) =>
		request({
			url: '/api/settings/conversationsType',
			method: 'GET',
			params
		}),
	// 群聊详情
	groupInfo: (params) =>
		request({
			url: '/api/settings/groupInfo',
			method: 'GET',
			params
		}),
	clearGroupMsg: (data) =>
		request({
			url: '/api/settings/delGroupMsg',
			method: 'POST',
			data
		}),
	addFriend: (params) =>
		request({
			url: '/api/settings/addFrined',
			method: 'GET',
			params
		}),
	myCode: (params) =>
		request({
			url: '/api/settings/getQrcode',
			method: 'GET',
			params
		}),
	addGroup: (params) =>
		request({
			url: '/api/settings/pullingGroup',
			method: 'GET',
			params
		}),
	setGroupUserInfo: (data) =>
		request({
			url: '/api/settings/editGroupUserInfo',
			method: 'POST',
			data
		}),
};